/**************************************************************************************
*
*	Copyright (C) 2009 - 2012 Brent Andrew O. Chua - See LICENSE.txt for more info.
*		
*	Filename	-	AsyncLoadResource.cpp
*
*	Comments	-	See AsyncLoadResource.h
*
**************************************************************************************/
#include "../Include/AsyncLoadResource.h"
#include "../Include/ResourcePoolItem.h"

namespace Pulse
{
	AsyncLoadResource::AsyncLoadResource( AdapterResourceLoader *pLoader )
		: m_pLoader( pLoader )
	{
		
	}

	AsyncLoadResource::~AsyncLoadResource( void )
	{

	}

	void AsyncLoadResource::SetResourceToLoad( AdapterResourceLoader *pLoader )
	{
		m_pLoader = pLoader;
	}

	BOOL AsyncLoadResource::Run( void )
	{
		if ( m_pLoader )
		{
			return m_pLoader->Run( m_pTaskStatus );
		}
		
		return FALSE;
	}

}